package cn.iocoder.yudao.module.system.dal.mysql.bookcollection;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.system.dal.dataobject.bookcollection.BookcollectionDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.system.controller.admin.bookcollection.vo.*;

/**
 * 绘本集 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface BookcollectionMapper extends BaseMapperX<BookcollectionDO> {

    default PageResult<BookcollectionDO> selectPage(BookcollectionPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<BookcollectionDO>()
                .likeIfPresent(BookcollectionDO::getTitle, reqVO.getTitle())
                .eqIfPresent(BookcollectionDO::getCreatedAt, reqVO.getCreatedAt())
                .orderByDesc(BookcollectionDO::getId));
    }

}